<div id="lista" class="row">

<h2>Usuários</h2>

<div id="filtro">
	<fieldset>
		<legend>Filtro</legend>
		<form action="index" id="filtro" method="post" class="well form-search">
			<div align="center">
				<input id="FiltroNome" name="data[Filtro][nome]" value="<?php if(isset($data['Filtro'])) echo $data['Filtro']['nome']; ?>" placeholder="Nome" class="input" />
				<input id="FiltroEmail" name="data[Filtro][email]" value="" placeholder="Email" class="input" />
				<button class="btn btn-small btn-primary" type="submit">Filtrar</button>
			</div>
		</form>
	</fieldset>
</div>

<div class="span12">
	<table class="table table-striped">
		<thead>
			<tr>
				<th>Nome</th>
				<th>Apelido</th>
				<th>Email</th>
				<th></th>
			</tr>
		</thead>
		<tbody>
		<?php if(!empty($usuarios)) { ?>
			<?php foreach($usuarios['Usuario'] as $usuario) :?>
				<tr>
					<td><?php echo $usuario['nome']; ?></td>
					<td><?php echo $usuario['apelido']; ?></td>
					<td><?php echo $usuario['email']; ?></td>
					<td>
						<?php echo $this->Html->link('<i class="icon-pencil"></i> Editar', 'Usuarios/edit/'.$usuario['id'], array('class'=>'btn btn-small')); ?> &nbsp;
						<?php echo $this->Html->link('<i class="icon-trash"></i> Excluir', 'Usuarios/delete/'.$usuario['id'], array('class'=>'btn btn-small')); ?> &nbsp;
					</td>
				</tr>
			<?php endforeach; ?>
		<?php } ?>
		<tbody>
	</table>
</div>

<div class="span16" id="acoes">
	<?php echo $this->Html->link('Cadastrar', 'Usuarios/add', array('class' => 'btn')); ?>
</div>

</div>
